package com.oa.login.biz;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.oa.login.dao.EmpMapper;
import com.oa.login.dao.UsersMapper;
import com.oa.login.entity.Emp;
import com.oa.login.entity.Users;

@Service
public class NameUtil {
	@Resource
	private EmpMapper empDao;
	
	
	@Resource
	private UsersMapper userDao;
	
	
	public String getName(String username){
		Users u=new Users();
		u.setUsername(username);
		int id=userDao.find(u);
		Emp emp=empDao.findByfk(id);
		return emp.getEmpName();
	}
	
}
